home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / base32pr.zip / BASE32 manual.txt < prev    next >
Text File  |  1997-03-18  |  54KB  |  1,763 lines

  1.  
  2. Base32
  3. for OS/2 WarpÖ
  4.  
  5.  
  6.  
  7.  
  8. Manual in text format for importation 
  9. into popular Word Processors
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40. ⌐ Maxxum Software 1997
  41.  
  42.  
  43.  
  44. Base32 Development environment for  OS/2 WarpÖ
  45.  
  46.  
  47. Chapter 1 - Introduction
  48.  
  49. Base32 is a development environment and compiler for dBase applications and OS/2 Warp. It works with a large range of dBase 3 and dBase 4 functions as well as providing additional, OS/2 specific functions.
  50.  
  51. The software will provide an environment to develop and test programs written in dBase as well as an option to compile stand alone 32 bit Presentation Manager applications for OS/2 WarpÖ
  52.  
  53. The program has been specifically written for OS/2 Warp and uses the full capabilities of this operating system to produce efficient executables from any dBase code.
  54.  
  55. This manual has been written assuming that the user has a good working knowledge of dBase and dBase functions so a detailed explanation of each function has not been included here. A full explanation of the Base32 OS/2 specific functions is included, however.
  56.  
  57. System requirements
  58.  
  59. Base32 requires OS/2 V3.0 ("Warp")or OS/2 V4.0 ("Merlin"). It should also operate correctly on OS/2 V2.1 but this has not been fully tested and cannot be assured.
  60.  
  61. System configuration should be a 486 PC with at least 8 MB Ram. The 
  62. software has been tested on  a variety of platforms but we are unable to guarantee operation on every PC type.
  63.  
  64. Syntax abbreviations in this manual
  65.  
  66. Statement elements
  67.  
  68. <Numeric expression>
  69. <Date expression>
  70. <Character expression>
  71. <Condition>
  72. <Field list>
  73. <Expression list>
  74.  
  75.  
  76. Installing Base32
  77.  
  78. All the files necessary to run Base32 are included on the distribution disk.
  79.  
  80. To install Base32, put the distribution disk in your floppy drive and open up an OS/2 window. Select the drive (e.g.. A:) and type INSTALL then press enter.
  81.  
  82. The installation program will then prompt you for a target drive and directory and install the program files.
  83.  
  84. Starting Base32
  85.  
  86. The installation program will create a Base32 program Icon on your desktop to select and run the program.
  87.  
  88.  
  89. The initial start up screen provides a number of options as follows:
  90.  
  91. Pull down menu
  92.  
  93. This contains a number of pull down menu options:
  94.  
  95. File
  96. Commands
  97. Locate
  98. View
  99. Exit
  100.  
  101. Each of the pull down menu sections are described in detail in the following chapters. Direct access to some of the functions is provided through the tool bar along the top of the screen. These Toolbar buttons are detailed in Chapter 6. 
  102.  
  103.  
  104.  
  105.  
  106. Chapter 2 - FILE menu
  107.  
  108. The file pull down menu provides the following options:
  109.  
  110. Use
  111.  
  112. The Use option selects the database file to be opened and used during the current session. At any time a new file can be opened using this command.
  113.  
  114. Create
  115.  
  116. This option allows you to create a database and save it with a specified name. 
  117.  
  118. Modify structure
  119.  
  120. Enables you to modify the field structure of a database and save the changes
  121.  
  122. Close All
  123.  
  124. Close All will close all open database files.
  125.  
  126. Compile
  127.  
  128. Compile will compile a specified program.  This option also provides the ability to generate a standalone executable 32 bit version of the program. 
  129.  
  130. Do
  131.  
  132. The Do command will load and execute a specific program. It will also 
  133. optionally compile the program if it has not been compiled previously (or if  has been modified since it was last compiled)
  134.  
  135. Learn
  136.  
  137. The Learn command captures a sequence of commands as you type then in. As well, changes can be made in the program which will recompile and execute.
  138.  
  139.  
  140.  
  141.  
  142.  
  143. Chapter 3 - Commands menu
  144.  
  145. The COMMANDS pull down menu contains the following options:
  146.  
  147. Pack
  148. The Pack command will remove any records marked for deletion from the 
  149. current database file.
  150.  
  151. Zap
  152. Zap will delete an entire database in one action
  153.  
  154. Reindex
  155. Reindex will re build the current indexes for the current database
  156.  
  157. Delete
  158. Delete allows you to select records for deletion based on conditions. (Refer to the DELETE statement in chapter 11)
  159.  
  160. Recall
  161. This function is the opposite of the Delete command and  untags records marked for deletion
  162.  
  163. Count
  164. This function will count the number of records which match a specified set of conditions (refer to COUNT statement in chapter 11)
  165.  
  166.  
  167.  
  168.  
  169.  
  170. Chapter 4 - Locate and View menus
  171.  
  172. The LOCATE pull down menu contains the following options:
  173.  
  174. Go Top
  175. This commands takes you to the first logical record in the database as determined by the current order of the database
  176.  
  177. Go Bottom
  178. This commands takes you to the last logical record in the database as 
  179. determined by the current order of the database
  180.  
  181. Goto
  182. Takes you directly to a specified record by number (the physical record order number)
  183.  
  184. Skip
  185. Move forwards or backwards through the database by a specified number of records.
  186.  
  187. Seek 
  188. This function finds a specific record, using the current database order and where you specify a key value. For example, where a database of contact names is ordered by surname, then you would specify a surname to find.
  189.  
  190. Locate
  191. Searches for a specific record which matches some particular condition. 
  192.  
  193.  
  194. The VIEW pull down menu contains the following options:
  195.  
  196. Browse
  197. Browse opens the database up in a table view and allows you navigate around the database. You can also edit or append records to the database. It supports many other features which are detailed in the BROWSE statement explanation in chapter 11.
  198.  
  199. View
  200. This option is the same as the Browse option but does not support editing of the database records or appending of new records
  201.  
  202. List
  203. Enables you to list specified fields in a database, only showing those records which meet specified conditions. Refer to the LIST statement in chapter 11.
  204.  
  205. List Structure
  206. Lists the structure of the database, detailing fields, field types, names and sizes.
  207.  
  208. Display
  209. The same as the LIST command above with the addition of  a pause between each page.
  210.  
  211. Display Structure
  212. The same as the Display Structure command above with the addition of  a pause between each page.
  213.  
  214.  
  215.  
  216.  
  217.  
  218.  
  219. Chapter 5 - Exit menu
  220.  
  221. The EXIT pull down menu contains the following options:
  222.  
  223. Exit
  224. Clicking on the exit option (or pressing F3) will close the program. As well, double clicking on the Base32 icon in the top left corner of the screen will similarly close down the program.
  225.  
  226. Escape
  227. Escape will give you the option (through a YES/NO box) to terminate any currently executing  command. Pressing the ESC key has the same effect.
  228.  
  229. Pause
  230. This pause any currently executing command and prompts you to press any key to continue the execution of that command. Pressing CNTRL/S has the same effect.
  231.  
  232.  
  233.  
  234.  
  235. Chapter 6 - Program navigation
  236.  
  237. 1. Toolbar
  238.  
  239. The main start up screen includes a Toolbar with a series of buttons which provide single click access to a number of key functions and commands.
  240.  
  241. Figure 1 - Toolbar
  242.  
  243. The buttons provide access to the following program and command functions (corresponding to the equivalent options in the pull down menus):        
  244.  
  245. Simply click on the appropriate button to select the function required
  246.  
  247. USE - the file load screen
  248.  
  249.  
  250. DO- load and run a program
  251.  
  252.  
  253. COMPILE - load and compile a program
  254.  
  255.  
  256. ZAP - removes all current records from the database selected
  257.  
  258.  
  259. PACK - removes records marked for deletion from the database    
  260.  
  261.  
  262. MODIFY - changes to the database structure 
  263.  
  264.  
  265. GO TOP - move to the first record in the database
  266.  
  267.  
  268. GO BOTTOM - move to the last record in the database
  269.  
  270.  
  271. GO TO - select a record to jump to
  272.  
  273.  
  274. SEEK - find a search string in the database
  275.  
  276.  
  277. PAUSE - pause the currently executing statement or command
  278.  
  279.  
  280. ESCAPE - stop processing the current statement or command
  281.  
  282.  
  283. 2. Drop down list box
  284.  
  285. This entry box accepts dBase command statements and executes them. As 
  286. additional statements are entered, they will appear in the program list box below. The results of each command will be displayed in the client window which is the majority of screen area.
  287.  
  288. You are able to enter most OS/2 commands preceded by an exclamation mark (!). Any OS/2 commands which have output only are supported (e.g.. DIR, DEL, REN et).
  289.  
  290. The Drop down list box also has an expansion button on the far right of the command line box. Clicking on that will expand the command line entry box to show previously entered statements up to a total of 50 statements.
  291.  
  292. You can double click on any statement in the list box to re-execute the statement. Alternatively you can use the down arrow key to step down through the statements. When you find the one you want, pressing ENTER will re-execute the statement.
  293.  
  294.  
  295. 3. Status line
  296.  
  297. The status line at the bottom of the screen dynamically updates to show the status of the current operation and work area. Base32 supports up to 40 con-current work areas allowing you to have up to 40 databases open at the same time.
  298.  
  299. 4. Scroll bars
  300.  
  301. The vertical and horizontal scroll bars allow you to move around on the screen. You can also use the conventional keys of Page UP, Page Down as well as the arrow keys when in BROWSE mode.
  302.  
  303. The scroll bars are only displayed if the Base32 main window size is reduced to anything less than its maximum size.
  304.  
  305.  
  306.  
  307.  
  308. Chapter 7 - Producing stand alone executables
  309.  
  310. The COMPILE function gives you the option to produce a standalone 
  311. executable (.EXE) file from your original .PRG source file. This executable is a full 32 bit OS/2 application which will use the full multi tasking, multi threaded capabilities of OS/2 Warp.
  312.  
  313. The compiler process takes the original source code, compiles it and creates an EXE file. The executable file requires the supplied  DLL files to operate. 
  314.  
  315. Any number of Base32 generated executables can share the same DLL files as long as they are in the same directory or the DLL files are on the specified LIBPATH. 
  316.  
  317. The resource file includes information about the licensed owner of the Base32 software being used to generate the executable. The distribution disks for Base32 are not copy protected and you are able to make backup disks as required for your own.
  318.  
  319. However, to protect the investment of registered purchasers of the software, the serial numbering of each copy is embedded in the resource file  and will provide a "signature" in the executable produced. 
  320.  
  321. Figure 2 - Compile screen
  322.  
  323.  
  324.  
  325.  
  326. Chapter 8 - Programming considerations
  327.  
  328. Section A - Variable types supported
  329.  
  330. Base32 supports the four standard field variable types:
  331.  
  332. 1. Character - up to a size of 65,533 characters
  333.  
  334. 2. Numeric - floating point up to 19 digits which includes the decimal point where applicable. There must be at least one significant digit.
  335.  
  336. 3. Date - standard eight characters which can be converted to any required date format using the SET DATE command 
  337.  
  338. 4. Logical - True/False represented by the values of 1 and 0
  339.  
  340. 5. Memo - variable up to 65,535 characters
  341.  
  342. Section B - Record locking
  343.  
  344. Base32 supports multiple access of the same database files. The record locking schema used by Base32 is compatible with dBase IV. Some operations cause automatic locking such as appending records and packing databases. After these operations are complete you must unlock the work area by either a unlock or unlock all statement.
  345.  
  346. Section C - Arrays
  347.  
  348. Single or double dimension arrays are allowed in base32. To declare arrays for base32 use either the local or public statements as follows public array <array name>[<dimension> ] for a single dimension public array, or local array <array name>[<x dimension>, <y dimension>] to declare a double dimension local array.
  349.  
  350. Note that all array indexing begins at one and goes to the dimension size and not zero as in some other languages.
  351.  
  352. Assignments made to an array where the array element index is omitted will result in each element of the array being assigned with this value. 
  353.  
  354. For example 
  355.  
  356. MyArray = 0 will assign zero to every element in MyArray. This is useful for initializing arrays.
  357.  
  358.  
  359. Section D - Parameter passing 
  360.  
  361. All parameters in base23 are passed by value with the exception of array parameters which are passed by reference. That means the any assignments made to any parameter array elements in a procedure or function  will overwrite the value in the original array element passed in as the parameter,all other parameter types will not affect the original variable.
  362.  
  363. Section E - Variable scoping
  364.  
  365. Variable scoping and declaration is dynamic in base32, in that when an expression is assigned to a new variable name, a local variable of this name is created and takes on the type of the expression being assigned. Using a new variable name in an expression for the first time will generate an error as unassigned variables cannot be read.
  366.  
  367. If an expression is assigned to an existing variable with a different type than the expression, the variable takes on the type of the expression.
  368.  
  369. If multiple instances of the of the same variable name exist, then variable a variable type priority is used when resolving the variable name to a variable instance. The following priority order is used to determine which instance is referenced.
  370.  
  371. ? Database field
  372. ? local variable
  373. ? public variable
  374.  
  375. To create a local instance of a variable name when a public one already exists use the local declaration statement as follows
  376.  
  377. local <variable name>
  378.  
  379. This will create a local instance of a variable that will be accessed in priority over a public variable.
  380.  
  381. A local variable instance is destroyed when the procedure or function where it was declared is exited. All procedures and functions that are called from where the variable was created can access local variable.
  382.  
  383. Public variables are exist until the program or Base32 is exited.
  384.  
  385.  
  386. Section F - Variable naming
  387.  
  388. Variable names unlike dBase can be up to 32 characters in length, All 32 characters of the name are used in identifying the variable. This may cause compatibility problems when re-compiling old dBase programs.
  389.  
  390. Section G - File naming conventions
  391.  
  392. Base32 uses the following file extensions to identify file types.
  393.  
  394. ? .prg program file
  395. ? .dbf database file
  396. ? .ndx index file 
  397. ? .res intermediate compiled program file.
  398.  
  399.  
  400. Section H - Macros
  401.  
  402. Macros in base32 are treated differently than in dBase. As Base32 is a true compiled language some restrictions were placed on macros in order to make the run-time execution more efficient. The components in a the language that can be replaced to macros are as follows
  403.  
  404. ? any expressions
  405. ? any filenames
  406. ? the on or off keyword in set to statements
  407.  
  408. However you cannot replace an entire statement with a macro variable. 
  409.  
  410. For example 
  411.  
  412. macrovar = ôonö
  413. set lpt1 ¯ovar 
  414. is valid, however 
  415. macrovar=ölpt1 onö
  416. set ¯ovar
  417.  
  418. is not valid.
  419.  
  420.  
  421.  
  422.  
  423. Chapter 9 - Standard dBase functions supported
  424.  
  425. ABS    
  426. ACOS    
  427. ALIAS    
  428. ASC    
  429. ASIN    
  430. AT    
  431. ATAN    
  432. ATN2    
  433. BOF    
  434. CDOW    
  435. CEILING    
  436. CHR    
  437. CMONTH    
  438. COL    
  439. COS    
  440. CTOD    
  441. DATE    
  442. DAY    
  443. DBF    
  444. DELETED    
  445. DISKSPACE    
  446. DOW    
  447. DTOC    
  448. DTOR    
  449. DTOS    
  450. EOF    
  451. EXP    
  452. FCLOSE    
  453. FCREATE    
  454. FDATE    
  455. FEOF    
  456. FERROR    
  457. FFLUSH    
  458. FGETS    
  459. FIELD    
  460. FILE    
  461. FLD COUNT    
  462. FLOCK    
  463. FLOOR    
  464. FOPEN    
  465. FOUND    
  466. FPUTS    
  467. FREAD    
  468. FSEEK    
  469. FSIZE    
  470. FTIME    
  471. FV    
  472. FWRITE    
  473. HOME    
  474. INT    
  475. ISALPHA    
  476. ISBLANK    
  477. ISLOWER    
  478. ISUPPER    
  479. LEFT    
  480. LEN    
  481. LIKE    
  482. LOCK    
  483. LOG    
  484. LOWER    
  485. LTRIM    
  486. MAX    
  487. MIN    
  488. MOD    
  489. MONTH    
  490. NDX    
  491. OS    
  492. PAYMENT    
  493. PCOL    
  494. PIF    
  495. PROW    
  496. PV    
  497. RAND    
  498. RAT    
  499. RECCOUNT    
  500. RECNO    
  501. RECSIZE    
  502. REPLICATE    
  503. RIGHT     
  504. RLOCK    
  505. ROUND    
  506. RTOD    
  507. RTRIM    
  508. SELECT    
  509. SET    
  510. SIGN    
  511. SIN    
  512. SPACE    
  513. SQRT    
  514. STOD    
  515. STR    
  516. STUFF    
  517. SUBSTR    
  518. TAN    
  519. TIME    
  520. TRANSFORM    
  521. TRIM    
  522. TYPE    
  523. UPPER    
  524. VAL    
  525. VERSION    
  526. YEAR    
  527.  
  528.  
  529. Chapter 10 - Additional functions 
  530.  
  531. Section A - Calling external OS/2 DLLs 
  532.  
  533. LOAD_DLL
  534.  
  535. Description: This function enables you to load a DLL file specified by name. This returns a number which is used as the handle for this file in the LINK_FUNC function.
  536.  
  537. Parameters: <string which is the name of the DLL file to load>
  538.  
  539. Example: DLLHANDLE = LOAD_DLL ("MY.DLL") - this will load a DLL called MY.DLL and return a handle for it in the variable called DLLHANDLE.
  540.  
  541.  
  542. LINK_FUNC
  543.  
  544. Description: This function allows you to get a handle to a user defined function in a previously loaded DLL (the DLL would have been previously loaded using the LOAD_DLL function).
  545.  
  546. Parameters: Requires two compulsory parameters -
  547.  
  548.  (1) Must be type numeric and is the handle to the DLL file it is to be loaded from; 
  549.  
  550. (2) Must be type character and is the name of the user defined function. Note that this parameter is case sensitive.
  551.  
  552. Example: 
  553.  
  554. FUNCTHANDLE = LINK_FUNC (DLLHANDLE,"MYFUNCT")
  555.  
  556.  
  557.  
  558. CALL
  559.  
  560. Description: This function calls and executes the user defined function. It returns the value returned by the user defined function. 
  561.  
  562. Parameters: This procedure has between one and six parameters.  
  563. Parameters are: 
  564.  
  565. (1) Compulsory and must be type numeric and is the handle to the function as returned by LINK_FUNC; 
  566.  
  567. (2) to (6) are optional parameters which are passed on to the user defined function
  568.  
  569. Example:
  570.  
  571. ? CALL( FUNCTHANDLE,"hello","anything","user data")
  572.  
  573.  
  574.  
  575.  
  576. Section B - Presentation Manager dialogue boxes
  577.  
  578. These functions all return a number. The number is the button pressed 
  579. counted from the left of the dialogue box. e.g.. in the YES/NO/CANCEL 
  580. function, the YES button pressed returns "1" , the NO button pressed 
  581. returns "2" etc.
  582.  
  583. OKAY
  584.  
  585. Change example here to "Report completed" or Invalid entry try again"
  586. OKAY statement screen
  587.  
  588. Description: Generates a prompt to the user to press OK (or click on it). Essentially acts as a pause tool with optional dialogue to the user.
  589.  
  590. Normally this functions returns "1" or "3" if Escape key was pressed
  591.  
  592. Parameters: Two compulsory parameters, both character type - 
  593.  
  594. (1) Title of the prompt box; 
  595.  
  596. (2) Statement or prompt to the user
  597.  
  598. Example:
  599.  
  600. ? OKAY("Title","Statement or prompt")      
  601.  
  602.  
  603.  
  604. OKCAN
  605.  
  606.  
  607. Description: Same as OKAY function except you have the additional option of a CANCEL button
  608.  
  609. The functions returns True or False with True = OK button
  610.  
  611. Parameters: Same as OKAY function
  612.  
  613. Example:
  614.  
  615. ? OKCAN("Will overwrite existing file","Continue?")      
  616.  
  617.  
  618.  
  619. YESNO
  620.  
  621.  
  622. Description: Generates a dialogue box with Yes/NO buttons
  623.  
  624. The functions returns True or False with True = YES button
  625. Parameters: Same as OKAY function
  626.  
  627. Example:
  628.  
  629. YESNO(" Exiting program","Are you sure?")
  630.  
  631.  
  632.  
  633.  
  634. YESNOCAN
  635.  
  636.  
  637. Description: Generates a dialogue box with three buttons - YES, NO and CANCEL
  638.  
  639. This function returns "1", "2" or "3" with 1 = YES button, 2 = No button and 3 = Cancel button or Escape key.
  640.  
  641. Parameters: Same as OKAY function
  642.  
  643. Example:
  644.  
  645. YESNOCAN( "Exit program", "Save data?")
  646.  
  647.  
  648.  
  649. SAVEDLG
  650.  
  651. Description: A dialogue which enables the user to select a name to save a file under. The functions returns the file name as a character string.
  652.  
  653. Parameters: Two parameters - 
  654.  
  655. (1) The tile in the dialogue box; 
  656.  
  657. (2) A skeleton for the file name or file extension
  658.  
  659. Example:
  660.  
  661. SAVEDLG( "Save document as?", "*.doc")
  662.  
  663.  
  664.  
  665.  
  666. OPENDLG
  667.  
  668. Description: A dialogue which enables the user to select the  name of a file to open. The functions returns the file name as a character string.
  669.  
  670. Parameters: Two parameters - 
  671.  
  672. (1) The title in the dialogue box; 
  673.  
  674. (2) A skeleton for the file name or file extension
  675.  
  676. Example:
  677.  
  678. OPENDLG( "Open which document?","*.doc")
  679.  
  680.  
  681.  
  682. FONTDLG
  683.  
  684. Description: This function provides a dialogue box for the user to select any pre loaded font. This routine returns a string containing the name of the font and the point size. The format of the return string can be fed directly into the SET FONT TO statement which will then change the font used in the client window.
  685.  
  686. The functions returns the font name and point size which can be used as direct input into Set Font To ie. Set Font To FONTDLG("Select a new font")
  687.  
  688. Parameters: Title of the dialogue box
  689.  
  690. Example:
  691.  
  692. FONTDLG("Select a new Font")
  693.  
  694.  
  695.  
  696.  
  697. Section C - Clipper specific functions
  698.  
  699. ADIR
  700.  
  701. Description: This function enables the user to determine all the files which match a wildcard string. 
  702.  
  703. Parameters: Accepts up to six parameters, the first of which is compulsory - 
  704. (1) Type string and is the file wildcard (e.g.. *.dbf); (2) to (6) are optional array parameters which are passed by reference. 
  705.  
  706.  (1) The first array parameter is where ADIR returns all the names of the files which match the skeleton. 
  707.  
  708. (2) The second is where it returns all the file sizes. 
  709.  
  710.  (3) Where it returns the file date (last date written to); 
  711.  
  712. (4) Where it returns the file last write time; 
  713.  
  714. (5) Where it returns the file attributes
  715.  
  716. The function returns the number of files which match the skeleton.
  717.  
  718. Example:
  719.  
  720. PUBLIC ARRAY NAMES[100] 
  721. PUBLIC ARRAY SIZES[100] 
  722. PUBLIC ARRAY DATES[100] 
  723. PUBLIC ARRAY TIMES[100] 
  724. PUBLIC ARRAY ATTRIBUTES[100] 
  725.  
  726. ? ADIR( "*.DBF" , NAMES , SIZES , DATES , TIMES , ATTRIBUTES ) 
  727.  
  728. ? names[1] 
  729.  
  730.  
  731.  
  732. Chapter 11 - Statements supported
  733.  
  734. Introduction
  735.  
  736. There are a number of basic principles that apply to dBase statements that need to be appreciated to get the full benefit of Base32's capabilities. 
  737.  
  738. The majority of statements follows a prescribed pattern of having a set of optional conditions - SCOPE, FOR and WHILE which can be put in any order. The conditions are optional unless specified otherwise in the individual statement explanations below.
  739.  
  740. SCOPE can be - ALL, REST or NEXT (n). Generally the default is ALL.
  741.  
  742. FOR can be - any logical expression e.g. a field content meeting a 
  743. prescribed value
  744.  
  745. WHILE can be  - the search will continue as long as the WHILE condition evaluates to TRUE. As soon as it reaches a record which evaluates to FALSE, the search will stop.
  746.  
  747.  
  748. Section A - General programming statements
  749.  
  750. Note that the examples included here are from the file EXAMPLE.PRG 
  751. included on the distribution disk and the example numbers correspond to those used in that program.
  752.  
  753. DELETE
  754.  
  755. Tags a record for deletion according to the Scope, For and While 
  756. conditions. Note that Delete without a Scope condition does NOT default to ALL but rather to the current record only (which will have been determined by previous commands such as Goto, Seek, Skip or similar).
  757.  
  758. * example 1
  759. * this example deletes account 10 from the data base if it exists
  760.  
  761. use customer.dbf index customer.ndx, custname.ndx in 1 
  762. select customer 
  763. seek 10 
  764. if found() 
  765.    delete
  766.    pack
  767. endif 
  768.  
  769. RECALL
  770.  
  771. Untags a record marked for deletion according to the Scope, For and While conditions. Note that Recall  without a Scope condition does NOT default to ALL but rather to the current record only (which will have been determined by previous commands such as Goto, Seek, Skip or similar).
  772.  
  773. * example 2
  774. * this example recalls all products with a non-zero price 
  775.  
  776. use products.dbf index product.ndx, prodname.ndx in 2
  777. select products
  778. recall all for price <> 0 
  779.  
  780. LOCATE
  781.  
  782. Locate is an alternative to Seek. Seek is an inflexible but fast search method whereas Locate allows considerably more flexibility to search under multiple conditions. 
  783.  
  784. Locate will stop when it finds the first match in the database.
  785. Combined with Continue, it will search until there are no further matches (Continue needs to be restated after each successful Locate to keep the search going).
  786.  
  787. If there is no Scope specified, the result will be ALL records. The FOR condition is compulsory as obviously the Locate would be meaningless without it. 
  788.  
  789. * example 3
  790. * this example puts Mr Smith into the customers data base with all 
  791. * of his details 
  792.  
  793. select customer
  794. seek 2 
  795. if .not. found() 
  796.   append blank 
  797.   replace account_no with 2 , ;
  798.           name       with "Smith Mr. D", ; 
  799.           address    with "125 Pah Rd Auckland NZ", ; 
  800.           balance    with 0.0 
  801. endif 
  802.  
  803. SUM
  804.  
  805. Adds up the contents of a list of fields. You have to specify to specify both the list of fields to Sum and also a list of variables to store the results of the Summing.
  806.  
  807.  
  808. COUNT
  809.  
  810. Provides the total number of records which match a FOR condition. You can also save the result to a variable if required by adding a TO statement.
  811.  
  812. REPLACE
  813.  
  814. Used to replace the contents of a selection of fields with the value from the expression supplied. If there is no SCOPE or FOR statement, it defaults to the current record only.
  815.  
  816. With the Replace statement, you can specify any number of fields to be acted on as long as they are separated by commas.
  817.  
  818. APPEND BLANK
  819.  
  820. Adds one blank record into the database - all character fields will be spaces, all numeric fields will be zeroes and all date fields will be spaces, all logical fields will be a space (which will evaluate to False)
  821.  
  822. * example 4
  823. * this example appends all products from the tempprod data base which 
  824. have
  825. * non-space  name
  826.  
  827. select products 
  828. append from tempprod.dbf for trim( name ) <> "" 
  829.  
  830. APPEND FROM 
  831.  
  832. Copies records from a named database to the current work area. You need to specify the database the records are to come from and  the Scope, For and While conditions. It is important to note that the Scope, For and While conditions apply to the database you are copying records from NOT the database you are Appending to.
  833.  
  834. If the two databases have different structures, the information in the field names that match will be copied across. If the field types are different, automatic type conversion is provided.
  835.  
  836. You also have the option to Append From a specified character delimited text file e.g. a comma delimited text file which is the most common type.
  837.  
  838. Appending From a comma delimited file into an empty database is a good way to import from the comma delimited file type.
  839.  
  840. COPY TO
  841.  
  842. The same as Append except it is copying records to another database. If the database you are copying to does not exist, then it will be created with the same structure as the database you are copying from.
  843.  
  844. You can also copy to a character delimited field (such as a comma delimited file) to export data from the database to another file type.
  845.  
  846. COPY STRUCTURE TO
  847.  
  848. Creates an empty database with the same structure as the current database but does not copy any records to the new database.
  849.  
  850. COPY FILE TO
  851.  
  852. This statement will do a binary file copy and can be used to copy any file type. Functions exactly the same as the COPY command at the command prompt.
  853.  
  854. DISPLAY
  855.  
  856. Display with an expression list will display all matching records on the current output device. There is an automatic pause between each page full of records.
  857.  
  858. DISPLAY STRUCTURE
  859.  
  860. Displays the current database structure to the current output device with an automatic pause between pages.
  861.  
  862. LIST
  863.  
  864. Functions the same as DISPLAY except there is no pause between pages of records.
  865.  
  866. LIST  STRUCTURE
  867.  
  868. Functions the same as display structure but without the pause between 
  869. pages of data.
  870.  
  871. SCAN
  872.  
  873. As well as using the standard Scope, For and While conditions you must then have at least one other command which is then performed for each record which passes the  FOR condition. To finish the SCAN block of commands, you must end with an ENDSCAN statement.
  874.  
  875. INSERT BLANK [AFTER]
  876.  
  877. A database manipulation statement which inserts a blank record 
  878. immediately prior to the current record location. If the optional AFTER clause is used, the record will be inserted after the current record location.
  879.  
  880. CLOSE ALL
  881.  
  882. Closes all currently open databases and index files
  883.  
  884. EJECT
  885.  
  886. Generates a form feed on the printer 
  887.  
  888. EJECT PAGE
  889.  
  890. Generates a page eject on the printer 
  891.  
  892.  
  893. RENAME..TO
  894.  
  895. Functions exactly the same as the RENAME function at an OS/2 command 
  896. prompt. Specify the current file name and the new file name.
  897.  
  898. ERASE
  899.  
  900. Functions exactly the same as the DEL command at an OS/2 command 
  901. prompt. Specify the file name to erase.
  902.  
  903. GO TOP [IN <ALIAS>]
  904.  
  905. Goes to the first logical record in the database as determined by the current order
  906.  
  907. GO BOTTOM [IN <ALIAS>]
  908.  
  909. Goes to the last logical record in the database as determined by the current order
  910.  
  911. GO or GOTO [IN <ALIAS>]
  912.  
  913. Interchangeable and will function exactly the same. With an optional  
  914. RECORD keyword followed by the record number as a numeric value will 
  915. take you to that specific record. The word RECORD can be left out and is often only included for readability of the source code. Thus GO 12 has the same effect as GO RECORD 12.
  916.  
  917. SKIP [IN <ALIAS>]
  918.  
  919. This function allows you to jump a specified number of records forward or backward in the database. Negative numbers determine the skip will be backward. If you do not specify a numeric value after the SKIP statement, the default will be one record.
  920.  
  921. SELECT
  922.  
  923. Allows you to specify which of the maximum of 40 work areas available in Base32 is the current work area. There are two ways to select a work area - by specifying the number of the work area or - by specifying the ALIAS of the database open in that area.
  924.  
  925. REINDEX
  926.  
  927. Rebuilds the indexes for the current work area
  928.  
  929. PACK
  930.  
  931. Removes all records tagged for deletion from the current work area
  932.  
  933. ZAP
  934.  
  935. Removes all records from the current work area regardless of the setting of the Delete tag.
  936.  
  937. INDEX ON
  938.  
  939. INDEX ON <expression> TO <index filename> [UNIQUE]
  940.  
  941. Allows you to create a new index file using the key expression supplied and optionally defining it as unique.
  942.  
  943. CLEAR SCREEN
  944.  
  945. Clears the current window (client area)
  946.  
  947. CLEAR GETS
  948.  
  949. Removes any current @GETS locations from the current window (client 
  950. area).
  951.  
  952. STORE TO
  953.  
  954. There are two ways to do an assignment e.g. X =Y. One is to use the store STATEMENT in the form STORE <expression> TO <variable name>.
  955.  
  956. The alternative is to use a simple statement such as <variable name> = <expression>
  957.  
  958. USE
  959.  
  960. Description:  USE opens a database up into either the current or a specified work area.  
  961.  
  962. Syntax:  USE <file name> [INDEX <file name>[,<file name>]] [ ALIAS 
  963. <ALIAS>] [IN <numeric expression>] [ORDER <file name>] [EXCLUSIVE]
  964.  
  965. Notes: 
  966.  
  967. (1)  INDEX refer to an index file list
  968.  
  969. (2) If the ALIAS name is not specified it will default to the name of the database without the path and extension. 
  970.  
  971. (3) Under ORDER, the file name specifies which of the index files to use. If not specified it will default to the first of the index files in the Index list
  972.  
  973.  
  974. Section B - Input and Output statements supported
  975.  
  976. READ
  977.  
  978. WAIT
  979.  
  980. @SAY
  981.  
  982. @EDIT
  983.  
  984. @FILL
  985.  
  986. @GET
  987.  
  988. @CLEAR
  989.  
  990. @SCROLL
  991.  
  992. @DOUBLE
  993.  
  994. @PANEL
  995.  
  996. @BOX
  997.  
  998.  
  999. Section C - ON statement
  1000.  
  1001.  
  1002.  
  1003. Section D - Structured programming statements
  1004.  
  1005.  
  1006. FOR..NEXT Loop
  1007.  
  1008. FOR <variable name> = <numeric expression> TO <numeric expression> 
  1009. [optional STEP]<numeric expression>
  1010.  
  1011. Program commands
  1012.  
  1013. NEXT
  1014.  
  1015. Note - If the STEP value is negative, then the starting value has to be greater than of equal to the terminating value.
  1016.  
  1017. LOOP
  1018.  
  1019. Also you can optionally use the LOOP statement which will go straight to the next iteration of the FOR statement. As well it can be used in DO..WHILE and REPEAT..UNTIL loops and with the SCAN statement.
  1020.  
  1021. EXIT
  1022.  
  1023. EXIT will immediately terminate the FOR loop. As well it can be used in DO..WHILE and REPEAT..UNTIL  loops and with the SCAN statement.
  1024.  
  1025.  
  1026. DO..WHILE loop
  1027.  
  1028. DO Procedure name [WITH Parameter list]
  1029.  
  1030. DO WHILE <condition><statements>
  1031.  
  1032. ENDDO terminating statements for the DO..WHILE loop
  1033.  
  1034. Call a procedure and execute it and then return to the following line on meeting a RETURN statement. If the RETURN statement is left out, the program will not compile.
  1035.  
  1036. RETURN
  1037.  
  1038. Return followed by some optional expression. If RETURN is by itself, then it will return to the calling location in the program
  1039.  
  1040. REPEAT..UNTIL loop
  1041.  
  1042. Execute a set of statements until a condition is true
  1043.  
  1044. REPEAT <statements> UNTIL <conditional statement>
  1045.  
  1046. LOOP and EXIT are optional once again
  1047.  
  1048. DO..CASE loop
  1049.  
  1050. Allows you to conditionally execute some piece of code based upon 
  1051. multiple conditions
  1052.  
  1053. DO CASE 
  1054. CASE <condition>STATEMENT
  1055. CASE <condition>STATEMENT
  1056. etc.
  1057. [OTHERWISE]alternative commands
  1058. ENDCASE
  1059.  
  1060. IF..ELSE loop
  1061.  
  1062. A conditional branching type statement
  1063.  
  1064. IF <condition>
  1065. <commands>
  1066. [ELSEIF] <condition>
  1067. <commands>
  1068. [ELSE}
  1069. <commands>
  1070. ENDIF
  1071.  
  1072. ELSEIF is logic which provides many possible branches after the condition test.
  1073.  
  1074.  
  1075.  
  1076.  
  1077. Section C - BROWSE statement
  1078.  
  1079.  
  1080.  
  1081.  
  1082. Chapter 12 - Set Variable commands
  1083.  
  1084. SET CENTURY ON/OFF
  1085.  
  1086. This statement determines whether the output from the DATE function 
  1087. displays the Century details. The variable has two possible values - ON or OFF. Setting to ON will display the century details and setting to OFF will suppress the display of the century details
  1088.  
  1089. SET DATE TO
  1090.  
  1091. Options: American, MDY, ANSI, British, DMY, French, German, Italian, Japan, YMD, USA
  1092.  
  1093. SET ORDER TO
  1094.  
  1095. Determines which index is used for the current view of the database. e.g.. SET ORDER TO 1 will set the order of the database to be the first index physical index list.
  1096.  
  1097. Set Order To 0 will sets the current order to the natural order of the database - the physical order of the records in the database.
  1098.  
  1099. SET INDEX TO
  1100.  
  1101. An alternative way to open up a list of indexes for a database or changing the current index for that database.
  1102.  
  1103. (Indexes are listed with commas between them if more than one)
  1104.  
  1105. You can also specify the default order for the database as part of the Set Index To statement. For example, Set Index To Name, Account, City Order City - this will specify the use of the three indexes Name, Account and City to be used with this database but the default order will be by City.
  1106.  
  1107. An alternative is to use the USE command with the list of indexes applicable as the last items e.g.. USE Customer.dbf  Name , Account  City. The database extension will default to .dbf if not  specified as something else.
  1108.  
  1109. SET PROCEDURE TO
  1110.  
  1111. Specify a file name of another PRG file to include in the current PRG file. For example, Set Procedure To INVOICE.PRG will include the source file INVOICE.PRG at this point in the parent PRG file. 
  1112.  
  1113. Note that directory and drive names can be included with the file name in any of these statements.
  1114.  
  1115. SET ALTERNATE TO
  1116.  
  1117. Specify a file to receive any output which is sent to the screen as well when Set Alternate On is specified. 
  1118.  
  1119. SET ALTERNATE ON/OFF
  1120.  
  1121. Set Alternate On will start flow of screen output to the file. Set Alternate Off will stop flow of screen output to the file. Use of  combinations of Set Alternate On and Set Alternate Off allows selected output to be directed to the file specified in Set Alternate To
  1122.  
  1123. SET ALTERNATE
  1124.  
  1125. This command without any extension (i.e.. without On or Off will close the file used up to that point for output re direction.
  1126.  
  1127. SET PRINTER TO
  1128.  
  1129. Directs the output to the screen to also go to a nominated printer device. Normally this is specified as LPT1 , LPT2 etc. but the printer device can also be a file 
  1130.  
  1131. SET PRINTER ON/OFF
  1132.  
  1133. This statement will direct output to the specified printer device as 
  1134. determined by the Set printer To statement.
  1135.  
  1136. SET PRINTER
  1137.  
  1138. This command without On or Off included will stop output to the printer and release the printer . Under OS/2, for non spooled printers this command releases the printer for other tasks or applications to use. For spooled printers under OS/2, the spooling finishes and printing will commence.
  1139.  
  1140. SET STATUS TO
  1141.  
  1142. The Set Status To statement is followed by an expression of type character. This expression is evaluated and then displayed on the status bar.
  1143.  
  1144. For example, Set Status To "Number of Customer is" + STR(RECCOUNT()).
  1145.  
  1146.  Note: This function is not a standard dBase function and is specific to Base32.
  1147.  
  1148. SET STATUS ON/OFF
  1149.  
  1150. This command turns the status bar on or off at the bottom of the main 
  1151. program window. This normally displays status information about the 
  1152. program or whatever is set by the Set Status To command 
  1153.  
  1154. SET TITLE TO
  1155.  
  1156. Defines what information is displayed in the title bar and the task list of currently running applications under OS/2.
  1157.  
  1158. Example - Set Title To "Customer maintenance Screen"
  1159.  
  1160. SET CONSOLE ON/OFF
  1161.  
  1162. Sets whether output goes to the screen. When used in conjunction with Set Printer On/Off, output can be directed to the Screen, Screen and Printer or Printer alone.
  1163.  
  1164. SET TALK ON/OFF
  1165.  
  1166. When executing typical database manipulation commands such as PACK, 
  1167. DELETE, USE and others this statement will provide confirmation of 
  1168. commands executed when Set talk On is used (or no confirmation if Set 
  1169. Talk Off used) - Defaults to On
  1170.  
  1171. SET SAFETY ON/OFF
  1172.  
  1173. If Set Safety is ON and you attempt to delete or overwrite a file, you will be prompted to confirm that you wish to continue - "Are you sure" is prompted. - Defaults to On
  1174.  
  1175. SET CURRENCY TO
  1176.  
  1177. Specify the currency symbol - e.g.. "$"  - up to 10 characters.
  1178.  
  1179. SET CURRENCY LEFT
  1180.  
  1181. Put the symbol before the number, right justified
  1182.  
  1183. SET CURRENCY RIGHT
  1184.  
  1185. Put the currency symbol after the number, left justified
  1186.  
  1187. SET DECIMALS TO
  1188.  
  1189. The system will display numbers to two decimal places by default when 
  1190. displaying numbers. This statement allows the number of decimal places to be set to any number between 0 and 16.
  1191.  
  1192. SET DEVICE TO [SCREEN/PRINTER/FILE]
  1193.  
  1194. This enables you specify where the program output goes to. When FILE is the option, you have to specify a file name e.g.. Set Device To File Invoice.log
  1195.  
  1196. SET DIRECTORY TO
  1197.  
  1198. Specify a drive and directory to become the current drive and directory. You can specify one or the other, or both. 
  1199.  
  1200. SET EXACT ON/OFF 
  1201.  
  1202. Determines with a search (using the SEEK command ONLY) must find an 
  1203. exact match to be successful as opposed to the search string being some part of the record. e.g.. If the search string is SMITH, then the Seek will only return entries where the name is exactly SMITH (including case sensitivity). If Set Exact Off is used, then entries such as SMITHSON, SMITHFIELD will also be found.
  1204.  
  1205. SET ESCAPE ON/OFF
  1206.  
  1207. Determines whether the escape key will function or not (produces a prompt as to whether you wish to continue or not). When Set Escape Off is used, the escape key is does not effect the operation of the program. 
  1208.  
  1209. SET EXCLUSIVE ON/OFF
  1210.  
  1211. Determine whether a database is used exclusively or not. The effects of this are:
  1212.  
  1213. Exclusive on:
  1214.  
  1215. (1) If a databases has already been set to exclusive by another program or task, your USE statement will fail
  1216.  
  1217. (2) If you set it to exclusive  on, then no other task or program can use it
  1218.  
  1219. If you want to modify the structure of a database, you MUST set it to 
  1220. exclusive on. 
  1221.  
  1222. SET DELETED ON/OFF
  1223.  
  1224. Determines whether records tagged for deletion are filtered out or not from processes such as displaying and listing. ON means records tagged for deletion are filtered out.
  1225.   
  1226. SET FILTER TO
  1227.  
  1228. This is related to the SET DELETED statement. Specify a logical expression which will evaluate to True or False. It will be evaluated for each record in the database. If it evaluated True for a record, that record will be visible.
  1229.  
  1230. SET FILTER TO LEFT( UPPER(Name),5) = "SMITH"
  1231.  
  1232. SET FILTER TO will remove the current filter
  1233.  
  1234. SET MARK TO
  1235.  
  1236. Determines the separator used in the Date display. Specify any character e.g.. Set Mark To "-"
  1237.  
  1238. SET NEAR ON/OFF
  1239.  
  1240. Similar to Set Exact. Effects the way a SEEK functions. Determines whether the Seek looks for the next closest match if an exact match cannot be found. if set to Off and no exact or partial match is found (depending whether Set Exact is On or Off), it will go to the bottom of the database.
  1241.  
  1242. (1) Exact and Near both OFF - if no partial match, will go to the bottom of the database
  1243.  
  1244. (2) Exact and Near both ON - if no exact match will go to the record location next to where you would have expected to find an exact match
  1245.  
  1246. (3) Exact ON and Near OFF - if no exact match it will go to the end of database
  1247.  
  1248. (4) Exact OFF and Near ON - if no partial match, it will go to the next logical record after where a partial match would have expected to have been.
  1249.  
  1250. SET POINT TO
  1251.  
  1252. Change the decimal point character e.g. 12.40 becomes 12,40
  1253.  
  1254. SET PRECISION TO 
  1255.  
  1256. Determines the total number of characters the number takes up including the decimal point. if the number is larger than the Set Precision amount, the number will either be displayed as asterisks or in scientific notation.
  1257.  
  1258. e.g.. Set Precision To 12
  1259.  
  1260. SET SEPARATOR TO
  1261.  
  1262. Sets the character to be used between thousands in numbers e.g., 100,000 or 100.000
  1263.  
  1264. e.g.. "." defaults to comma
  1265.  
  1266. SET SPACE ON/OFF
  1267.  
  1268. When database is listed, do you have a space separator between fields
  1269.  
  1270. SET WRAP ON/OFF
  1271.  
  1272. List or display and record takes up more than one line - determines whether anything after 80 columns wraps onto next line or is ignored
  1273.  
  1274. Defaults to On
  1275.  
  1276. SET RELATION TO
  1277.  
  1278. Followed by expression; and then database or work area name e.g.. Set 
  1279. Relation To Number into PLUHIST - this will set up a one to one relationship between the two databases.
  1280.  
  1281.  It evaluates the expression for the first database and uses that as a value to seek for in the second database using its current index.
  1282.  
  1283. Ensure that information from two separate databases can be used to 
  1284. display or work with and the correct matching of data from both will be maintained.
  1285.  
  1286. SET COLOR TO
  1287.  
  1288. This statement allows you to change the display characteristics on both color and monochrome displays. The statement recognises four areas of the display in terms of changing the color attributes. These are:
  1289.  
  1290. (1) Standard - which under DOS contains the Normal, Messages and Titles display areas
  1291.  
  1292. (2) Enhanced - which under DOS contains the Box, Highlight and 
  1293. Information display areas
  1294.  
  1295. (3) Perimeter
  1296.  
  1297. (4) Background
  1298.  
  1299. Each of these areas of the display can be assigned different attributes to provide complex screen designs and variety.
  1300.  
  1301. In the Set Color To statement, attributes are assigned to each area 
  1302. separated by commas. In each area it is possible to combine attributes to create new colors and combine base and new colors with effects. In this case the color and effect settings must be separated by a forward slash.
  1303.  
  1304. However, there are marked differences between the DOS environment that many dBase programs have been written for, and  the Presentation 
  1305. Manager environment under OS/2. Effectively, Base 32 allows color control over three distinct  window areas - Foreground, Background and Perimeter.
  1306.  
  1307. However, to ensure compatibility, Base32 will accept program lines that conform to dBase standards for DOS. Where these environment variables are set elsewhere according to presentation Manager standards, the instructions will be compiled and have no effect.
  1308.  
  1309. For example, under Presentation Manager colors for dialog boxes, menu 
  1310. bars, scroll bards, title bars, window borders etc are determined by OS/2 and are under the control of the User and not the program's control.
  1311.  
  1312. These are set up as part of the Scheme Palette setup in the System Setup folder on the Desktop.
  1313.  
  1314. The permissible base colors and effects are:
  1315.  
  1316. Colors:
  1317.  
  1318. W - white
  1319. G - green
  1320. N - black
  1321. B - dark blue
  1322. R - dark red
  1323.  
  1324. Effects:
  1325.  
  1326. U - underline
  1327. X - blank
  1328. + - bright
  1329.  
  1330. Note that unlike dBase under DOS, where regardless of where you place it, the bright attribute only affects the foreground area - under Base32 this attribute can be set for any of the three window areas.
  1331.  
  1332. It is possible on a color display to combine color attributes to produce other colours  as per the table below:
  1333.  
  1334. Combination colors
  1335.  
  1336. R/G = brown
  1337. R/B = dark pink/light red
  1338. G/B = dark cyan
  1339. R/G/B = pale grey
  1340. N+ = dark grey
  1341. R+ = red
  1342. G+ = light green
  1343. B+ = blue
  1344. R/G+ = yellow
  1345. R/B+ = pink
  1346. G/B+ = cyan
  1347.  
  1348. Note also that blinking and inverse video are not supported under 
  1349. Presentation Manager's windows and these attributes in a source program will have no effect.
  1350.  
  1351. Example:
  1352.  
  1353. Set Color To W,N,R,B+* 
  1354.  
  1355.  
  1356. SET FIELDS TO
  1357.  
  1358. Determines specific fields that you are interested in and suppresses the remaining fields - you can make visible the key fields you are interested in and ignore the rest. Supply list of fields separated by commas.
  1359.  
  1360.  
  1361. SET FIELDS ON/OFF
  1362.  
  1363. Turns on Set Fields T function or turns it off (back to all fields)
  1364.  
  1365. Can also create a derived field which is an additional field made up from an expression. e.g.. A field called customer has three balance fields - a new derived field could be Total Bal (Total Balance).
  1366.  
  1367. eg. Set Fields To Name, City, TotalBal = Bal1 + Bal2 +Bal3
  1368.  
  1369. You can also set individual fields to have specific attributes. E.g.. /R means the field is Read Only
  1370.  
  1371. Set Fields To Name /R
  1372.  
  1373.  
  1374.  
  1375.  
  1376.  
  1377. Chapter 13 - Configuration program
  1378.  
  1379. Base32 uses a dBase program called CONFIG.PRG to set the environment 
  1380. variables for each Base32 session. CONFIG.PRG is any valid dBase 
  1381. program and contains necessary environment set-up statements such as 
  1382. fonts and language. Typically it will contain SET statements which establish the "look and feel" of the environment.
  1383.  
  1384. If any changes are made to CONFIG.PRG between Base32 sessions, the 
  1385. program will automatically re compile the config program. If there have been no changes, it will run the previously compiled version of CONFIG.PRG.
  1386.  
  1387. The environment set-up by the configuration program remains unchanged 
  1388. throughout the Base32 session.
  1389.  
  1390. If there is no CONFIG.PRG program present, the program will use current environment variables set on the PC when it loads. 
  1391.  
  1392.  
  1393.  
  1394.  
  1395. Chapter 14 - Function errors
  1396.  
  1397. The system will produce error messages when it encounters an expression that does not conform to expected dBase rules or is unknown to the system. 
  1398.  
  1399. Once again, these error messages assume a working knowledge of dBase 
  1400. programming,
  1401.  
  1402. Function error list
  1403.  
  1404. 0.    "')' expected." ,
  1405.  
  1406. 1.    "Expression expected." ,
  1407.  
  1408. 2.    "Incompatible types" ,
  1409.  
  1410. 3.    "Procedure or main code too large." ,
  1411.  
  1412. 4.    "End of line expected." ,
  1413.  
  1414. 5.    "'(' expected." ,
  1415.  
  1416. 6.    "',' expected." ,
  1417.  
  1418. 7.    "ON or OFF expected." ,
  1419.  
  1420. 8.    "Invalid or unknown date format." ,
  1421.  
  1422. 9.    "Invalid or unsupported set type." ,
  1423.  
  1424. 10.    "'=' expected." ,
  1425.  
  1426. 11.    "':' in wrong place, or invalid drive specifier." ,
  1427.  
  1428. 12.    "'.' in wrong place, or invalid file extension." ,
  1429.  
  1430. 13.    "Invalid file path." ,
  1431.  
  1432. 14.    "Alias name expected." ,
  1433.  
  1434. 15.    "Work area number expected in range 1-40." ,
  1435.  
  1436. 16.    "Index file name expected." ,
  1437.  
  1438. 17.    "Invalid format for USE statement." ,
  1439.  
  1440. 18.    "Field name expected." ,
  1441.  
  1442. 19.    "Area number or alias name expected." ,
  1443.  
  1444. 20.    "WHILE , CASE or procedure name expected." ,
  1445.  
  1446. 21.    "No ENDDO found for DO WHILE." ,
  1447.  
  1448. 22.    "Unsupported or invalid statement." ,
  1449.  
  1450. 23.    "No ENDIF found for IF." ,
  1451.  
  1452. 24.    "No ENDCASE found for DO CASE." ,
  1453.  
  1454. 25.    "CASE expected." ,
  1455.  
  1456. 26.    "'[' expected." ,
  1457.  
  1458. 27.    "']' expected." ,
  1459.  
  1460. 28.    "Variable name expected." ,
  1461.  
  1462. 29.    "',' or ')' expected." ,
  1463.  
  1464. 30.    "\"%s\" is a procedure and not a function." ,
  1465.  
  1466. 31.    "\"%s\" is a function and not a procedure." ,
  1467.  
  1468. 32.    "You cannot nest procedures of functions." ,
  1469.  
  1470. 33.    "End of source found before RETURN." ,
  1471.  
  1472. 34.    "TO expected." ,
  1473.  
  1474. 35.    "More than one scope found in statement." ,
  1475.  
  1476. 36.    "More then one WHILE expression in statement." ,
  1477.  
  1478. 37.    "More then one FOR expression in statement." ,
  1479.  
  1480. 38.    "Invalid format in SUM statement." ,
  1481.  
  1482. 39.    "Invalid format in DELETE statement." ,
  1483.  
  1484. 40.    "Invalid format in RECALL statement." ,
  1485.  
  1486. 41.    "Invalid format in COUNT statement." ,
  1487.  
  1488. 42.    "Invalid format in REPLACE statement." ,
  1489.  
  1490. 43.    "WITH expected." ,
  1491.  
  1492. 44.    "Invalid format in LOCATE statement." ,
  1493.  
  1494. 45.    "Work area number must be from 1 to 40." ,
  1495.  
  1496. 46.    "')' , work area number or alias expected.",
  1497.  
  1498. 47.    "Invalid character in MACRO name." ,
  1499.  
  1500. 48.    "Error in type for ORDER." ,
  1501.  
  1502. 49.    "EOF found before ENDSCAN." ,
  1503.  
  1504. 50.    "No current scope for LOOP." ,
  1505.  
  1506. 51.    "No current scope for EXIT." ,
  1507.  
  1508. 52.    "Error in format of SCAN scope." ,
  1509.  
  1510. 53.    "File name or macro expected for index file." ,
  1511.  
  1512. 54.    "Error in format of LIST statement." ,
  1513.  
  1514. 55.    "Invalid type for negate." , 
  1515.  
  1516. 56.    "Invalid operand types for multiply or divide." ,
  1517.  
  1518. 57.    "Error in format of COPY TO statement." ,
  1519.  
  1520. 58.    "Error in format of APPEND statement." ,
  1521.  
  1522. 59.    "Cannot open \"%s\" source file." ,
  1523.  
  1524. 60.    "File name expected." ,
  1525.  
  1526. 61.    "No arguments for RUN." ,
  1527.  
  1528. 62.    "ON, OFF or TO expected." ,
  1529.  
  1530. 63.    "TO expected." ,
  1531.  
  1532. 64.    "INTO expected." ,
  1533.  
  1534. 65.    "Invalid drive specifier." ,
  1535.  
  1536. 66.    "SCREEN, PRINTER or FILE expected." ,
  1537.  
  1538. 67.    "Unresolved label \"%s\"." ,
  1539.  
  1540. 68.    "Invalid qualifier for CLEAR." ,
  1541.  
  1542. 69.    "Invalid format for @ SAY" ,
  1543.  
  1544. 70.    "Invalid format for @ GET" ,
  1545.  
  1546. 71.    "Invalid format for ?/??" ,
  1547.  
  1548. 72.    #ifdef COMPILER 
  1549.  
  1550. 73.    "Invalid \"%s\" code file." ,
  1551.  
  1552. 74.    #else 
  1553.  
  1554. 75.    "Invalid code/data in EXE file." ,
  1555.  
  1556. 76.    #endif 
  1557.  
  1558. 77.    "Unable to open \"%s\" code file." ,
  1559.  
  1560. 78.    "MASTER expected." ,
  1561.  
  1562. 79.    "NEXT expected." ,
  1563.  
  1564. 80.    "Invalid scroll statement." ,
  1565.  
  1566. 81.    "ON, OFF, TO or OF expected." ,
  1567.  
  1568. 82.    "Invalid qualifier for ON statement." ,
  1569.  
  1570. 83.    "LINE expected." ,
  1571.  
  1572. 84.    "ALL expected." ,
  1573.  
  1574. 85.    "invalid format for BROWSE statement." ,
  1575.  
  1576. 86.    "only /R permitted here." ,
  1577.  
  1578. 87.    "compile cancelled by user." ,
  1579.  
  1580. 88.    "ENDSCAN expected." ,
  1581.  
  1582. 89.    "Invalid file name for create." ,
  1583.  
  1584. 90.    "%s does not exist." ,
  1585.  
  1586. 91.    "*** NULL ERROR message *** " ,
  1587.  
  1588.  
  1589.  
  1590.  
  1591. Chapter 15 - Compiler errors
  1592.  
  1593. The system will produce errors when trying to compile a dBase program if it finds an expression which does not conform to accepted dBase rules or encounters an expression which it does not recognise.
  1594.  
  1595. Compiler error list
  1596.  
  1597. 0.      "Data base with alias \"%s\" does not have field         \"%s\"." ,
  1598.  
  1599. 1.       "No such data base alias as \"%s\"." ,
  1600.  
  1601. 2.       "Variable \"%s\" is unassigned." ,
  1602.  
  1603. 3.      "Divide by zero error." ,
  1604.  
  1605. 4.       "Cannot add a %s to a %s." ,
  1606.  
  1607. 5.       "Cannot subtract a %s from a %s." ,
  1608.  
  1609. 6.      "LOGICAL expression expected for .NOT. ." ,
  1610.  
  1611. 7.       "Cannot compare a %s with a %s." ,
  1612.  
  1613. 8.       "LOGICAL expression expected for .AND. ." ,
  1614.  
  1615. 9.      "LOGICAL expression expected for .OR. ." ,
  1616.  
  1617. 10.       "non numeric string parameter for STOD()." ,
  1618.  
  1619. 11.       "invalid date string for CTOD()." ,
  1620.  
  1621. 12.      "CHARACTER expression expected for USE." ,
  1622.  
  1623. 13.       "Invalid work area number, must be 1-20." ,
  1624.  
  1625. 14.       "Data base \"%s\" did not open successfully." ,
  1626.  
  1627. 15.       "No open data base in the current work area." ,
  1628.  
  1629. 16.       "LOGICAL expression expected for condition." ,
  1630.  
  1631. 17.      "[%-12lf] invalid array dimension for \"%s\"." ,
  1632.  
  1633. 18.       "NUMERIC value expected for array \"%s\"." ,
  1634.  
  1635. 19.       "[%-12lf,%-12lf] invalid array dimensions for         
  1636.     \"%s\"." ,
  1637.  
  1638. 20.       "NUMERIC, NUMERIC values expected for array     \"%s\".",
  1639.  
  1640. 21.       "[%ld] bad array index for \"%s\"." ,
  1641.  
  1642. 22.       "\"%s\" is not a one dimensional array." ,
  1643.  
  1644. 23.      "NUMERIC value expected for index into \"%s\"." ,
  1645.  
  1646. 24.       "[%ld,%ld] bad array index for \"%s\"." ,
  1647.  
  1648. 25.       "\"%s\" is not a two dimensional array." ,
  1649.  
  1650. 26.       "NUMERIC, NUMERIC value expected for index     
  1651.     into \"%s\"." ,
  1652.  
  1653. 27.      "CHARACTER value expected for assignment to     \"%s\" 
  1654. field." ,
  1655.  
  1656. 28.       "DATE value expected for assignment to \"%s\"     
  1657.     field." ,
  1658.  
  1659. 29.       "NUMERIC value expected for assignment to         
  1660.     \"%s\"  field." ,
  1661.  
  1662. 30.       "LOGICAL value expected for assignment to         
  1663.     \"%s\" field." ,
  1664.  
  1665. 31.       "<%s> Index file did not open successfully.", 
  1666.  
  1667. 32.       "No tag selected for work area." ,
  1668.  
  1669. 33.       "Tag type differs from expression type." ,
  1670.  
  1671. 34.       "Index file error. please re-index." ,
  1672.  
  1673. 35.       "Invalid SET ORDER TO number." ,
  1674.  
  1675. 36.       "Invalid SET ORDER TO tag name." ,
  1676.  
  1677. 37.       "Invalid expression type for SET ORDER TO" ,
  1678.  
  1679. 38.       "Invalid expression type for ORDER expression" ,
  1680.  
  1681. 39.       "Error creating \"%s\" with \"%s\" expression." ,
  1682.  
  1683. 40.       "Maximum index files for area exceeded." ,
  1684.  
  1685. 41.       "Wrong number of parameters for \"%s\"" ,
  1686.  
  1687. 42.       "Have a %s value, expect a %s value for %s" ,
  1688.  
  1689. 43.       "Have %s,%s values, expect %s,%s values for    %s" ,
  1690.  
  1691. 44.      "Have %s,%s,%s values, expect %s,%s,%s values for %s" ,
  1692.  
  1693. 45.       "Error while appending record in APPEND 
  1694. FROM/COPY FROM." ,
  1695.  
  1696. 46.       "Cannot create \"%s\" successfully." ,
  1697.  
  1698. 47.       "Invalid type in macro for alias." ,
  1699.  
  1700. 48.       "Invalid file handle." ,
  1701.  
  1702. 49.       "No file handles available." ,
  1703.  
  1704. 50.       "Unable to start command processor." ,
  1705.  
  1706. 51.       "Cannot find %s." ,
  1707.  
  1708. 52.       "Invalid MODE for FSEEK()." ,
  1709.  
  1710. 53.       "invalid MODE for FOPEN() or FCREAT()." ,
  1711.  
  1712. 54.       "Can not open \"%s\"." ,
  1713.  
  1714. 55.       "Cannot initialise for filter and/or relation." ,
  1715.  
  1716. 56.       "Cannot make relation \"%s\"" , 
  1717.  
  1718. 57.       "Cannot set filter \"%s\"" , 
  1719.  
  1720. 58.       "Database \"%s\" already open or alias already         used." ,
  1721.  
  1722. 59.       "Public variable \"%s\" already exists." , 
  1723.  
  1724. 60.       "Invalid opcode, call Tech Support." ,
  1725.  
  1726. 61.       "cannot read an unassigned variable." ,
  1727.  
  1728. 62.       "Macro \"%s\" is not a function or procedure." , 
  1729.  
  1730. 63.       "call stack overflow." ,
  1731.  
  1732. 64.       "working stack overflow." ,
  1733.  
  1734. 65.       "Data base \"%s\" must be opened exclusively for 
  1735.     operation." ,
  1736.  
  1737. 66.       "No valid scope or FOR condition set." ,
  1738.  
  1739. 67.       "Bad parameter for PICTURE, FUNCTION or         
  1740.     TRANSFORM()." ,
  1741.  
  1742. 68.       "two NUMERICS expected for @ SAY" ,
  1743.  
  1744. 69.       "\"%s\" is not a field in the current data base." ,
  1745.  
  1746. 70.       "DLL \"%s\" did not load successfully." ,
  1747.  
  1748. 71.       "Call \"%s\" did not link successfully." ,
  1749.  
  1750. 72.       "Invalid parameters for external call." ,
  1751.  
  1752. 73.       "Invalid external call." ,
  1753.  
  1754. 74.       "ARRAY parameter expected." ,
  1755.  
  1756.  
  1757.  
  1758.  
  1759.  
  1760. Rev1v15
  1761. 14/03/97
  1762. Base32        Reference Manual
  1763.